

class ArchievesSourceEntity {
	ArchievesSourceRoleinfo roleInfo;
	ArchievesSourceUserweaponbaseinfo userWeaponBaseInfo;

	ArchievesSourceEntity({this.roleInfo, this.userWeaponBaseInfo});

	ArchievesSourceEntity.fromJson(Map<String, dynamic> json) {
		roleInfo = json['roleInfo'] != null ? new ArchievesSourceRoleinfo.fromJson(json['roleInfo']) : null;
		userWeaponBaseInfo = json['userWeaponBaseInfo'] != null ? new ArchievesSourceUserweaponbaseinfo.fromJson(json['userWeaponBaseInfo']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.roleInfo != null) {
      data['roleInfo'] = this.roleInfo.toJson();
    }
		if (this.userWeaponBaseInfo != null) {
      data['userWeaponBaseInfo'] = this.userWeaponBaseInfo.toJson();
    }
		return data;
	}
}

class ArchievesSourceRoleinfo {
	ArchievesSourceRoleinfoCardlevel cardLevel;
	ArchievesSourceRoleinfoUpgradable upgradable;
	ArchievesSourceRoleinfoUpgradelevel upgradeLevel;
	List<ArchievesSourceRoleinfoGood> goods;
	int fightingCapacity;
	int upgradeFightingCapacity;

	ArchievesSourceRoleinfo({this.cardLevel, this.upgradable, this.upgradeLevel, this.goods, this.fightingCapacity, this.upgradeFightingCapacity});

	ArchievesSourceRoleinfo.fromJson(Map<String, dynamic> json) {
		cardLevel = json['cardLevel'] != null ? new ArchievesSourceRoleinfoCardlevel.fromJson(json['cardLevel']) : null;
		upgradable = json['upgradable'] != null ? new ArchievesSourceRoleinfoUpgradable.fromJson(json['upgradable']) : null;
		upgradeLevel = json['upgradeLevel'] != null ? new ArchievesSourceRoleinfoUpgradelevel.fromJson(json['upgradeLevel']) : null;
		if (json['goods'] != null) {
			goods = new List<ArchievesSourceRoleinfoGood>();(json['goods'] as List).forEach((v) { goods.add(new ArchievesSourceRoleinfoGood.fromJson(v)); });
		}
		fightingCapacity = json['fightingCapacity'];
		upgradeFightingCapacity = json['upgradeFightingCapacity'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.cardLevel != null) {
      data['cardLevel'] = this.cardLevel.toJson();
    }
		if (this.upgradable != null) {
      data['upgradable'] = this.upgradable.toJson();
    }
		if (this.upgradeLevel != null) {
      data['upgradeLevel'] = this.upgradeLevel.toJson();
    }
		if (this.goods != null) {
      data['goods'] =  this.goods.map((v) => v.toJson()).toList();
    }
		data['fightingCapacity'] = this.fightingCapacity;
		data['upgradeFightingCapacity'] = this.upgradeFightingCapacity;
		return data;
	}
}

class ArchievesSourceRoleinfoCardlevel {
	int res;
	int def;
	int level;
	int mentality;
	int physique;
	List<ArchievesSourceRoleinfoCardlevelConsumable> consumables;
	int hp;
	String updateTime;
	int speed;
	int awareness;
	String cardId;
	int tactics;
	int atk;
	int id;

	ArchievesSourceRoleinfoCardlevel({this.res, this.def, this.level, this.mentality, this.physique, this.consumables, this.hp, this.updateTime, this.speed, this.awareness, this.cardId, this.tactics, this.atk, this.id});

	ArchievesSourceRoleinfoCardlevel.fromJson(Map<String, dynamic> json) {
		res = json['res'];
		def = json['def'];
		level = json['level'];
		mentality = json['mentality'];
		physique = json['physique'];
		if (json['consumables'] != null) {
			consumables = new List<ArchievesSourceRoleinfoCardlevelConsumable>();(json['consumables'] as List).forEach((v) { consumables.add(new ArchievesSourceRoleinfoCardlevelConsumable.fromJson(v)); });
		}
		hp = json['hp'];
		updateTime = json['updateTime'];
		speed = json['speed'];
		awareness = json['awareness'];
		cardId = json['cardId'];
		tactics = json['tactics'];
		atk = json['atk'];
		id = json['id'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['res'] = this.res;
		data['def'] = this.def;
		data['level'] = this.level;
		data['mentality'] = this.mentality;
		data['physique'] = this.physique;
		if (this.consumables != null) {
      data['consumables'] =  this.consumables.map((v) => v.toJson()).toList();
    }
		data['hp'] = this.hp;
		data['updateTime'] = this.updateTime;
		data['speed'] = this.speed;
		data['awareness'] = this.awareness;
		data['cardId'] = this.cardId;
		data['tactics'] = this.tactics;
		data['atk'] = this.atk;
		data['id'] = this.id;
		return data;
	}
}

class ArchievesSourceRoleinfoCardlevelConsumable {
	String id;
	int type;
	int value;

	ArchievesSourceRoleinfoCardlevelConsumable({this.id, this.type, this.value});

	ArchievesSourceRoleinfoCardlevelConsumable.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		type = json['type'];
		value = json['value'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		data['type'] = this.type;
		data['value'] = this.value;
		return data;
	}
}

class ArchievesSourceRoleinfoUpgradable {
	bool maxLevel;
	bool roleProperty;
	bool junMoXiaoLevel;
	bool goods;

	ArchievesSourceRoleinfoUpgradable({this.maxLevel, this.roleProperty, this.junMoXiaoLevel, this.goods});

	ArchievesSourceRoleinfoUpgradable.fromJson(Map<String, dynamic> json) {
		maxLevel = json['maxLevel'];
		roleProperty = json['roleProperty'];
		junMoXiaoLevel = json['junMoXiaoLevel'];
		goods = json['goods'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['maxLevel'] = this.maxLevel;
		data['roleProperty'] = this.roleProperty;
		data['junMoXiaoLevel'] = this.junMoXiaoLevel;
		data['goods'] = this.goods;
		return data;
	}
}

class ArchievesSourceRoleinfoUpgradelevel {
	int res;
	int def;
	int level;
	int mentality;
	int physique;
	List<ArchievesSourceRoleinfoUpgradelevelConsumable> consumables;
	int hp;
	String prerequisite;
	String updateTime;
	int speed;
	int awareness;
	String cardId;
	int tactics;
	int atk;
	int id;

	ArchievesSourceRoleinfoUpgradelevel({this.res, this.def, this.level, this.mentality, this.physique, this.consumables, this.hp, this.prerequisite, this.updateTime, this.speed, this.awareness, this.cardId, this.tactics, this.atk, this.id});

	ArchievesSourceRoleinfoUpgradelevel.fromJson(Map<String, dynamic> json) {
		res = json['res'];
		def = json['def'];
		level = json['level'];
		mentality = json['mentality'];
		physique = json['physique'];
		if (json['consumables'] != null) {
			consumables = new List<ArchievesSourceRoleinfoUpgradelevelConsumable>();(json['consumables'] as List).forEach((v) { consumables.add(new ArchievesSourceRoleinfoUpgradelevelConsumable.fromJson(v)); });
		}
		hp = json['hp'];
		prerequisite = json['prerequisite'];
		updateTime = json['updateTime'];
		speed = json['speed'];
		awareness = json['awareness'];
		cardId = json['cardId'];
		tactics = json['tactics'];
		atk = json['atk'];
		id = json['id'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['res'] = this.res;
		data['def'] = this.def;
		data['level'] = this.level;
		data['mentality'] = this.mentality;
		data['physique'] = this.physique;
		if (this.consumables != null) {
      data['consumables'] =  this.consumables.map((v) => v.toJson()).toList();
    }
		data['hp'] = this.hp;
		data['prerequisite'] = this.prerequisite;
		data['updateTime'] = this.updateTime;
		data['speed'] = this.speed;
		data['awareness'] = this.awareness;
		data['cardId'] = this.cardId;
		data['tactics'] = this.tactics;
		data['atk'] = this.atk;
		data['id'] = this.id;
		return data;
	}
}

class ArchievesSourceRoleinfoUpgradelevelConsumable {
	String id;
	int type;
	int value;

	ArchievesSourceRoleinfoUpgradelevelConsumable({this.id, this.type, this.value});

	ArchievesSourceRoleinfoUpgradelevelConsumable.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		type = json['type'];
		value = json['value'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		data['type'] = this.type;
		data['value'] = this.value;
		return data;
	}
}

class ArchievesSourceRoleinfoGood {
	int userNum;
	String id;
	int type;
	int value;
	ArchievesSourceRoleinfoGoodsInfo info;

	ArchievesSourceRoleinfoGood({this.userNum, this.id, this.type, this.value, this.info});

	ArchievesSourceRoleinfoGood.fromJson(Map<String, dynamic> json) {
		userNum = json['userNum'];
		id = json['id'];
		type = json['type'];
		value = json['value'];
		info = json['info'] != null ? new ArchievesSourceRoleinfoGoodsInfo.fromJson(json['info']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['userNum'] = this.userNum;
		data['id'] = this.id;
		data['type'] = this.type;
		data['value'] = this.value;
		if (this.info != null) {
      data['info'] = this.info.toJson();
    }
		return data;
	}
}

class ArchievesSourceRoleinfoGoodsInfo {
	int harvest;
	String materialType;
	String name;
	String icon;
	int id;
	String materialId;
	String desc;
	int quality;

	ArchievesSourceRoleinfoGoodsInfo({this.harvest, this.materialType, this.name, this.icon, this.id, this.materialId, this.desc, this.quality});

	ArchievesSourceRoleinfoGoodsInfo.fromJson(Map<String, dynamic> json) {
		harvest = json['harvest'];
		materialType = json['materialType'];
		name = json['name'];
		icon = json['icon'];
		id = json['id'];
		materialId = json['materialId'];
		desc = json['desc'];
		quality = json['quality'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['harvest'] = this.harvest;
		data['materialType'] = this.materialType;
		data['name'] = this.name;
		data['icon'] = this.icon;
		data['id'] = this.id;
		data['materialId'] = this.materialId;
		data['desc'] = this.desc;
		data['quality'] = this.quality;
		return data;
	}
}

class ArchievesSourceUserweaponbaseinfo {
	int weaponLevel;
	int maxFormLevel;
	int formLevel;

	ArchievesSourceUserweaponbaseinfo({this.weaponLevel, this.maxFormLevel, this.formLevel});

	ArchievesSourceUserweaponbaseinfo.fromJson(Map<String, dynamic> json) {
		weaponLevel = json['weaponLevel'];
		maxFormLevel = json['maxFormLevel'];
		formLevel = json['formLevel'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['weaponLevel'] = this.weaponLevel;
		data['maxFormLevel'] = this.maxFormLevel;
		data['formLevel'] = this.formLevel;
		return data;
	}
}
